package com.icloud.article.boot.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 点赞记录
 * </p>
 *
 * @author raymond
 * @since 0000-00-00
 */
@Getter
@Setter
@TableName("upvote")
@ApiModel(value = "Upvote对象", description = "点赞记录")
public class Upvote implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty("修改时间")
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty("创建人id")
    @TableField("created_id")
    private Long createdId;

    @ApiModelProperty("业务id，点赞的帖子该字段则是帖子id；点赞的评论该字段就是评论id")
    @TableField("business_id")
    private Long businessId;

    @ApiModelProperty("业务类型,ARTICLE,DISCUSS")
    @TableField("business_type")
    private String businessType;

    @ApiModelProperty("业务创建人id")
    @TableField("business_created_id")
    private Long businessCreatedId;
}
